3.151 \(\int x^{-1-2 n} \sin ^2(a+b x^n) \, dx\)

Optimal. Leaf size=95 \[ \frac {b^2 \cos (2 a) \text {Ci}\left (2 b x^n\right )}{n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {x^{-2 n}}{4 n} \]

[Out]

-1/4/n/(x^(2*n))+b^2*Ci(2*b*x^n)*cos(2*a)/n+1/4*cos(2*a+2*b*x^n)/n/(x^(2*n))-b^2*Si(2*b*x^n)*sin(2*a)/n-1/2*b*
sin(2*a+2*b*x^n)/n/(x^n)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3425, 3380, 3297, 3303, 3299, 3302} \[ \frac {b^2 \cos (2 a) \text {CosIntegral}\left (2 b x^n\right )}{n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {x^{-2 n}}{4 n} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 - 2*n)*Sin[a + b*x^n]^2,x]

[Out]

-1/(4*n*x^(2*n)) + Cos[2*(a + b*x^n)]/(4*n*x^(2*n)) + (b^2*Cos[2*a]*CosIntegral[2*b*x^n])/n - (b*Sin[2*(a + b*
x^n)])/(2*n*x^n) - (b^2*Sin[2*a]*SinIntegral[2*b*x^n])/n

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3380

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3425

Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int x^{-1-2 n} \sin ^2\left (a+b x^n\right ) \, dx &=\int \left (\frac {1}{2} x^{-1-2 n}-\frac {1}{2} x^{-1-2 n} \cos \left (2 a+2 b x^n\right )\right ) \, dx\\ &=-\frac {x^{-2 n}}{4 n}-\frac {1}{2} \int x^{-1-2 n} \cos \left (2 a+2 b x^n\right ) \, dx\\ &=-\frac {x^{-2 n}}{4 n}-\frac {\operatorname {Subst}\left (\int \frac {\cos (2 a+2 b x)}{x^3} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}+\frac {b \operatorname {Subst}\left (\int \frac {\sin (2 a+2 b x)}{x^2} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {b^2 \operatorname {Subst}\left (\int \frac {\cos (2 a+2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {\left (b^2 \cos (2 a)\right ) \operatorname {Subst}\left (\int \frac {\cos (2 b x)}{x} \, dx,x,x^n\right )}{n}-\frac {\left (b^2 \sin (2 a)\right ) \operatorname {Subst}\left (\int \frac {\sin (2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}+\frac {b^2 \cos (2 a) \text {Ci}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 82, normalized size = 0.86 \[ \frac {x^{-2 n} \left (4 b^2 \cos (2 a) x^{2 n} \text {Ci}\left (2 b x^n\right )-4 b^2 \sin (2 a) x^{2 n} \text {Si}\left (2 b x^n\right )-2 b x^n \sin \left (2 \left (a+b x^n\right )\right )+\cos \left (2 \left (a+b x^n\right )\right )-1\right )}{4 n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 - 2*n)*Sin[a + b*x^n]^2,x]

[Out]

(-1 + Cos[2*(a + b*x^n)] + 4*b^2*x^(2*n)*Cos[2*a]*CosIntegral[2*b*x^n] - 2*b*x^n*Sin[2*(a + b*x^n)] - 4*b^2*x^
(2*n)*Sin[2*a]*SinIntegral[2*b*x^n])/(4*n*x^(2*n))

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 107, normalized size = 1.13 \[ \frac {b^{2} x^{2 \, n} \cos \left (2 \, a\right ) \operatorname {Ci}\left (2 \, b x^{n}\right ) + b^{2} x^{2 \, n} \cos \left (2 \, a\right ) \operatorname {Ci}\left (-2 \, b x^{n}\right ) - 2 \, b^{2} x^{2 \, n} \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x^{n}\right ) - 2 \, b x^{n} \cos \left (b x^{n} + a\right ) \sin \left (b x^{n} + a\right ) + \cos \left (b x^{n} + a\right )^{2} - 1}{2 \, n x^{2 \, n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*sin(a+b*x^n)^2,x, algorithm="fricas")

[Out]

1/2*(b^2*x^(2*n)*cos(2*a)*cos_integral(2*b*x^n) + b^2*x^(2*n)*cos(2*a)*cos_integral(-2*b*x^n) - 2*b^2*x^(2*n)*
sin(2*a)*sin_integral(2*b*x^n) - 2*b*x^n*cos(b*x^n + a)*sin(b*x^n + a) + cos(b*x^n + a)^2 - 1)/(n*x^(2*n))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{-2 \, n - 1} \sin \left (b x^{n} + a\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*sin(a+b*x^n)^2,x, algorithm="giac")

[Out]

integrate(x^(-2*n - 1)*sin(b*x^n + a)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 89, normalized size = 0.94 \[ -\frac {x^{-2 n}}{4 n}-\frac {2 b^{2} \left (-\frac {x^{-2 n} \cos \left (2 a +2 b \,x^{n}\right )}{8 b^{2}}+\frac {\sin \left (2 a +2 b \,x^{n}\right ) x^{-n}}{4 b}+\frac {\Si \left (2 b \,x^{n}\right ) \sin \left (2 a \right )}{2}-\frac {\Ci \left (2 b \,x^{n}\right ) \cos \left (2 a \right )}{2}\right )}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1-2*n)*sin(a+b*x^n)^2,x)

[Out]

-1/4/n/(x^n)^2-2/n*b^2*(-1/8/(x^n)^2/b^2*cos(2*a+2*b*x^n)+1/4*sin(2*a+2*b*x^n)/(x^n)/b+1/2*Si(2*b*x^n)*sin(2*a
)-1/2*Ci(2*b*x^n)*cos(2*a))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {2 \, n x^{2 \, n} \int \frac {\cos \left (2 \, b x^{n} + 2 \, a\right )}{x x^{2 \, n}}\,{d x} + 1}{4 \, n x^{2 \, n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*sin(a+b*x^n)^2,x, algorithm="maxima")

[Out]

-1/4*(2*n*x^(2*n)*integrate(cos(2*b*x^n + 2*a)/(x*x^(2*n)), x) + 1)/(n*x^(2*n))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\sin \left (a+b\,x^n\right )}^2}{x^{2\,n+1}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x^n)^2/x^(2*n + 1),x)

[Out]

int(sin(a + b*x^n)^2/x^(2*n + 1), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1-2*n)*sin(a+b*x**n)**2,x)

[Out]

Timed out

________________________________________________________________________________________